package com.jy.api.dao;

import com.jy.api.domain.DiscountPromotionOrder;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.Date;

public interface DiscountPromotionOrderDao  extends JpaRepository<DiscountPromotionOrder, Integer>, JpaSpecificationExecutor<DiscountPromotionOrder> {
    Page<DiscountPromotionOrder> findAllByPromotionIdAndPayTimeBetween(int promotionId, Date begin, Date end, Pageable  pageable);

    Page<DiscountPromotionOrder> findAllByPromotionId(int promotionId,  Pageable  pageable);
}
